package com.qqtech.qquan.activity.model;

import java.sql.Timestamp;
import java.util.List;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.qqtech.core.common.util.StringUtil;
import com.qqtech.core.common.util.TimeUtil;
import com.qqtech.qquan.activity.enums.ActivityBaseStatusDictEnum;
import com.qqtech.qquan.activity.enums.ActivityConst;

@SuppressWarnings("serial")
public class ActivityBaseVo extends ActivityBase {
	/**
	 * 报名列表
	 */
	private List<ActivitySignVo> signList;

	private String showStatus;

	/**
	 * 报名人数
	 */
	private Integer signCount;

	/**
	 * 是否报名
	 */
	private boolean isSign;
	/**
	 * 展示价格
	 */
	private String showCost;

	/**
	 * 展示时间
	 */
	private String showTime;

	/**
	 * 主办方业务id
	 */
	private Integer sponsorId;

	/**
	 * 主办方logo
	 */
	private String sponsorLogo;
	/**
	 * 主办方name
	 */
	private String sponsorName;

	private String userNick;

	private String userLogo;

	private Integer replyCount;

	private Integer praiseCount;
	
	/** 是否被当前登录人点过赞;1-是,2-否 **/
	private java.lang.Integer isPraised;

	/** 是否被当前登录人关注;1-是,2-否 **/
	private java.lang.Integer isConcern;

	/** 是否显示点赞人列表 **/
	private java.lang.Boolean isShowPraiseList;

	/** 点赞人列表 **/
	private java.lang.String praiseUserList;

	public String getBigPathLogo() {
		if (StringUtil.isBlank(this.getLogo())) {
			return "";
		}
		return this.getImgHandleDomain() + getLogo();
	}

	public String getFullUserLogo() {
		if (StringUtil.isNotBlank(getUserLogo())) {
			return super.getFileDomain() + "" + getUserLogo();
		}
		return null;
	}

	public java.lang.Integer getIsConcern() {
		return isConcern;
	}

	public java.lang.Integer getIsPraised() {
		return isPraised;
	}

	/** 是否显示图片 **/
	public boolean getIsShowImg() {
		if (StringUtils.isNotBlank(this.getResumeImg())) {
			return true;
		} else {
			return false;
		}
	}

	public java.lang.Boolean getIsShowPraiseList() {
		return isShowPraiseList;
	}

	public boolean getIsSign() {
		return isSign;
	}

	public String getPathImgs() {
		if (StringUtil.isBlank(this.getResumeImg())) {
			return "";
		}
		String filePath = ";" + this.getFileDomain();
		String pathImgs = this.getResumeImg().replaceAll(";", filePath);
		return this.getFileDomain() + pathImgs;
	}

	public String getPathLogo() {
		if (StringUtil.isBlank(this.getLogo())) {
			return "";
		}
		return this.getImgHandleDomain() + getLogo() + ActivityConst.IMG_POSTFIX;
	}

	public Integer getPraiseCount() {
		return praiseCount;
	}

	public java.lang.String getPraiseUserList() {
		return praiseUserList;
	}

	public Integer getReplyCount() {
		return replyCount;
	}

	public String getShowCost() {
		return showCost;
	}

	public String getShowStatus() {
		if(ActivityBaseStatusDictEnum.SOONSTART.getCode()==getStatus()){
			showStatus = ActivityBaseStatusDictEnum.SOONSTART.getDesc();
		}else if(ActivityBaseStatusDictEnum.SIGN.getCode()==getStatus()){
			showStatus = ActivityBaseStatusDictEnum.SIGN.getDesc();
		}else if(ActivityBaseStatusDictEnum.PROCEED.getCode()==getStatus()){
			showStatus = ActivityBaseStatusDictEnum.PROCEED.getDesc();
		}else if(ActivityBaseStatusDictEnum.FINISH.getCode()==getStatus()){
			showStatus = ActivityBaseStatusDictEnum.FINISH.getDesc();
		}else if(ActivityBaseStatusDictEnum.INVALID.getCode()==getStatus()){
			showStatus = ActivityBaseStatusDictEnum.INVALID.getDesc();
		}
		return showStatus;
	}
	
	public String getStrNewAt() {
		return TimeUtil.getStringTimeByFormat(getNewAt(), "yyyy-MM-dd HH:mm");
	}

	public String getStrUpdAt() {
		return TimeUtil.getStringTimeByFormat(getUpdAt(), "yyyy-MM-dd HH:mm");
	}
	
	public String getStStartAt() {
		return TimeUtil.getStringTimeByFormat(getStartAt(), "yyyy-MM-dd HH:mm");
	}
	
	public String getStEndAt() {
		return TimeUtil.getStringTimeByFormat(getEndAt(), "yyyy-MM-dd HH:mm");
	}
	
	public String getStSignEndAt() {
		return TimeUtil.getStringTimeByFormat(getSignEndAt(), "yyyy-MM-dd HH:mm");
	}

	public String getShowTime() {
		return showTime;
	}

	public Integer getSignCount() {
		return signCount;
	}

	public List<ActivitySignVo> getSignList() {
		return signList;
	}

	public Integer getSponsorId() {
		return sponsorId;
	}

	public String getSponsorLogo() {
		return sponsorLogo;
	}

	public String getSponsorName() {
		return sponsorName;
	}
	public String getUserLogo() {
		return userLogo;
	}

	public String getUserNick() {
		return userNick;
	}

	public void setIsConcern(java.lang.Integer isConcern) {
		this.isConcern = isConcern;
	}

	public void setIsPraised(java.lang.Integer isPraised) {
		this.isPraised = isPraised;
	}

	public void setIsShowPraiseList(java.lang.Boolean isShowPraiseList) {
		this.isShowPraiseList = isShowPraiseList;
	}

	public void setIsSign(boolean isSign) {
		this.isSign = isSign;
	}

	public void setPraiseCount(Integer praiseCount) {
		this.praiseCount = praiseCount;
	}

	public void setPraiseUserList(java.lang.String praiseUserList) {
		this.praiseUserList = praiseUserList;
	}

	public void setReplyCount(Integer replyCount) {
		this.replyCount = replyCount;
	}

	public void setShowCost(String showCost) {
		this.showCost = showCost;
	}

	public void setShowStatus(String showStatus) {
		this.showStatus = showStatus;
	}

	public void setShowTime(String showTime) {
		this.showTime = showTime;
	}

	public void setSignCount(Integer signCount) {
		this.signCount = signCount;
	}

	public void setSignList(List<ActivitySignVo> signList) {
		this.signList = signList;
	}

	public void setSponsorId(Integer sponsorId) {
		this.sponsorId = sponsorId;
	}

	public void setSponsorLogo(String sponsorLogo) {
		this.sponsorLogo = sponsorLogo;
	}

	public void setSponsorName(String sponsorName) {
		this.sponsorName = sponsorName;
	}

	public void setUserLogo(String userLogo) {
		this.userLogo = userLogo;
	}

	public void setUserNick(String userNick) {
		this.userNick = userNick;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
	}
}